---------------------------------------------------------------------------
                             HTMLEx V1.07
                        (c)Zoltan Pekic, 1996.
                        zoltanp@rijeka.riteh.hr
                       Last updated: 13.05.1996.  
---------------------------------------------------------------------------
Contents:

1. What is HTMLEx?

2. How does it work?

3. Hardware/software requirements

4. Installation

5. Deinstallation

6. Files used by/changed by HTMLEx
   6.1. HTM Files
        6.1.1. Server variable tags
        6.1.2. Current access tags
        6.1.3. Last access tags
        6.1.4. Other tags
        6.1.5. User-defined random generation tags (in INI file)
        6.1.6. User-defined random generation tags (in Registry)
        6.1.7. User-defined constant tags (in INI file)
        6.1.8. User-defined constant tags (in Registry)
        6.1.9. Additional notes about HTMLEx tags
   6.2. INI Files
   6.3. LOG Files
   6.4. Application event log

7. Controlling HTMLEx behaviour
   7.1. Via Registry
   7.2. Via <!HTMLEx> tag

8. File list 

9. Revision history

10. Notes, comments, warnings, bugs etc.

Appendix A. Date/time values formatting codes (strftime function) 
---------------------------------------------------------------------------

1. What is HTMLEx?

   HTMLEx is an ISAPI Filter (DLL) for Microsoft's Internet Information 
   Server. (IIS in the following text). The use of this filter enhances
   the HTM pages with features such as: customizeable text and graphic
   counters,  greeting messages with client's  browser and  host name, 
   automatic  generation of last update date/time values,  inclusion of
   unlimited number  of randomly generated URLs and/or images (eg. for 
   ads) on the page, etc.: all of this on a per-page basis  without 
   writing a single line of CGI code! These features are configured by
   various sections of an INI file which has the same name and location
   as its corresponding HTM file, or using the HTMLEx key in registry.
   For each HTM file HTMLEx will also generate its own log file (also 
   in Windows INI file compatible layout).


2. How does it work?

   ISAPI (Internet Server API) filters are replaceable DLLs called by the
Microsoft's WWW server (inetinfo.exe) on every HTTP request. During the
DLLs registration process, the filter must tell the server in which type
of notification is it interested, and subsequently the server will call
the appropriate notification routine in the DLL, with all the date need-
ded to process the request. The filter can add, delete, change or simply
monitor the flow of this data. More than one filter can be chained in
the processing of a HTTP request.
   ISAPI filters have two entry points (exported functions):

>  GetFilterVersion. Exchanges version information with the server, and
   requests notifications about events filter wants to process. The HTMLEx
   filter is interested in following notifications:
   - SF_NOTIFY_URL_MAP ... server is mapping URLs to real directory/file
     locations on the hard disk (LAN).           
   - SF_NOTIFY_SEND_RAW_DATA ... server is sending requested data (or
     error messages) back to client.
   These two notifications will be called regardless whether is it an
   unsecure or secure (SSL) HTTP transaction, and with default notifi-
   cation order (ie. following the order in which they appear in the 
   \HKEY_LOCAL_MACHINE\...\W3SVC\Parameters\Filter DLLs key.).   
   During this phase, global configuration parameters are read from
   the HTMLEx key (if present). Hard-coded defaults are used if the
   required value is not present there.

>  HttpFilterProc. Called two times during the HTTP request process:
   - case SF_NOTIFY_URL_MAP ... called for all files (JPG, GIF etc.),
     not just HTM, therefore we first check the filename extension for
     ".htm" or ".HTM". If there is no match, the pFilterContext pointer
     is set to NULL, indicating that this file must be let alone. Other-
     wise, two additional filenames (with extensions INI and LOG) are
     created and the tag expansion routine is called. All the work is
     done within the HTMLExpand function. The original HTM file is 
     read in, and scanned for the "<!HTMLEx noexpand" string which aborts      
     all further expansion. Memory for the expanded page is allocated via
     server's AllocMem function, and made somewhat larger than the ori-
     nal file. Tag values are gathered from: constant strings, INI sec-
     tions, current date/time, server's CGI variables etc. HTM code in
     pcHTM buffer is parsed, with all the tag names being replaced with
     its corresponding values. The current transaction parameters (date,
     time, browser, clients IP address and resolved hostname, access
     count) are stored in the INI [LastAccess] section, and a new entry
     is appended to the LOG file.
   - case SF_NOTIFY_SEND_RAW_DATA ... the data is ready to leave the
     server. If the pFilterContext pointer is NULL, it means it's not
     an HTM file, or it was not succesfully expanded, and the original
     data is presented to the client. Otherwise, the "HTTP/1.0" string
     (which must be present in all valid HTTP transaction headers!) is
     searched for. If found, the "Content-Length" header line must be
     replaced with the new length of the HTM body. If not found, it
     means server is about to send the actual HTM text body, and IIS
     redirected from the original send buffer to pcHTM, effecti-
     vely doing the trick!  
     

3. Hardware/software requirements

   All that apply to IIS: Windows NT Server 3.51 or higher (Please note
   that IIS WON'T run on NT Workstation! Beats me why, but I'm sure it's
   not for any technical reason.), under NTFS partition (for reasons of
   security), 16MB RAM minimum (read: 32). Currently, there is only an
   Intel version available, but the source code is included in this dis-
   tribution, and it would be very nice if someone with NT running on
   those fancy Alphas, MIPSes or PPCs took some time and recompile it
   (Microsoft Visual C++ 2.1 or higher) for the benefit of his/her own
   computing community! 


4. Installation

   > After unzipping, move the HTMLEx.dll file to its final destination.
     Good choice is ...\IIS\server directory, where other filters are
     stored by default.
   > Using the Internet Service Manager (inetmgr.exe) stop the WWW service.
   > Open the Registry editor (REGEDT32.EXE). Find the following key:
     \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
     The value "Filter DLLs" (REG_SZ type) is a comma delimited list of
     all registered ISAPI filters. Normaly, only the sspifilt.dll is here,
     append to the end of the list a comma followed by the HTMLEx.dll FULL 
     path\name.
   > Optionally, create a key named "HTMLEx" under the ...\W3SVC key. 
     This key contains the HTMLEx global configuration values (see 7.1).
   > Close the Registry editor (will update the registry).
   > Start the WWW service in the Internet Service Manager.
   > To check it out, open the Event Viewer (EVENTVWR.EXE) and look at the
     Application Log: there should be an information event generated by
     HTMLEx.dll 


5. Deinstallation

   > Using the Internet Service Manager (inetmgr.exe) stop the WWW service.
   > Open the Registry editor (REGEDT32.EXE). Find the following key:
     \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
     Remove the reference to HTMLEx.dll from the "Filter DLLs" value.
     Make sure you're not leaving behind any surplus commas, and you're not
     changing references to any other DLLs present there.
   > If present, remove the "HTMLEx" key from ...\W3SVC key
   > Delete the HTMLEx.dll file
   > Start the WWW service in the Internet Service Manager.


6. Files used by/changed by HTMLEx

6.1. HTM Files

   If the ExpandByDefault registry value is set to 1 (default), HTMLEx will
try to parse every HTM file before being sent to the client. In order to
disable this behavior (eg. for improved performance), insert the following
tag somewhere at the top of HTM file:

<!HTMLEx noexpand>

According to HTML syntax, clients will interpret this as an comment, but
HTMLEx will abort all processing (including the generation of INI and LOG
files) as soon as this string (case sensitive!) is encountered.
   As an alternative, if the ExpandByDefault registry value contains 0, no
parsing/expanding will occur, unless the following tag is found near the top
of file:

<!HTMLEx expand>

   All HTMLEx tags are case sensitive strings with rather descriptive 
names, marked with a leading and trailing percent signs (%), eg.:
%CurrentClientIPAddress%, %SERVER_SOFTWARE%, %LastFileUpdateDate% etc.
   To have a single percent sign displayed in the client's browser,
use the "null tag", which is %%.

*****************************************************************
                   ! !  W A R N I N G ! !
*****************************************************************
Some HTML tag use a single % sign (e.g. <hr width=65%>). This can 
confuse HTMLEx - write <hr width=65%%> instead. This problem has
been (I hope!) corrected in V1.04
*****************************************************************
In V1.06 and above, it is possible to change the tag start/end 
strings from % / % to something else, e.g. <!# / #!>. Use this 
feature to avoid confusion with server includes, if enabled!
*****************************************************************

6.1.1. Server variable tags

   Mostly for request debugging purposes, HTMLEx will recognize and expand
the following CGI variable tags into its values:

%SERVER_SOFTWARE%       ... Microsoft-Internet-Information-Server/1.0
%CONTENT_LENGTH%        ... 0 (unknown at this point)
%CONTENT_TYPE%          ... null (MIME mapping not done yet)
%GATEWAY_INTERFACE%     ... CGI/1.1
%PATH_INFO%             ... null (valid only for scripts)
%PATH_TRANSLATED%       ... HTM file location on the server (drive:\path)
%QUERY_STRING%          ... null (valid only for scripts)
%REMOTE_ADDR%           ... clients IP address (numeric)
%REMOTE_HOST%           ... same as above
%REMOTE_USER%           ... null (valid only after authentication)
%REQUEST_METHOD%        ... GET
%SCRIPT_NAME%           ... HTM file path as it appears in its URL
%SERVER_NAME%           ... servers IP address 
%SERVER_PORT%           ... as configured, 80 by default
%SERVER_PROTOCOL%       ... HTTP/1.0
%HTTP_USER_AGENT%       ... Mozilla/x.xx most of the time :)
%HTTP_ACCEPT%           ... MIME types client browser is able to handle

   The value of these variables is captured during the transaction's
HTTP_FILTER_URL_MAP phase.


6.1.2. Current access tags

   Tags that apply to current connection between the client and server:

%CurrentCnt%              ... Number of hits this page had received
                              since its INI file was created (in plain
                              text form)
%CurrentGraphCnt%         ... Same as above, but in graphical form.
                              This tag creates a number (2-9, as given
                              by the iDigitCount entry in INI file [Log]
                              section) of <img src="X" alt="x"> URLs,
                              where X is the appropriate string from the
                              c0 to c9 entries in INI file [Digits] section. 
                              Defaults are /0.gif to /9.gif (unless
                              changed by Digits section in registry) 
                              - meaning they have to be in server's home
                              directory.
%CurrentClientIPAddress%  ... Same as %REMOTE_ADDR%
%CurrentClientHost%       ... If this tag is present, HTMLEx will try
                              to do a reverse DNS lookup (get host name
                              by its numeric address). This can be a time
                              consuming process, which will stall the 
                              data transfer until done or the attempt
                              times out. 
%CurrentClientBrowser%    ... Same as %HTTP_USER_AGENT% 
%CurrentAccessDate%       ... Current system date. All date values
                              are formatted according to cDateFormat 
                              entry in LOG file [Log] section. Default
                              is "%A, %B %d, %Y." (unless changed by
                              DateFormat value in registry) 
%CurrentAccessTime%       ... Current system time. All time values
                              are formatted according to cTimeFormat 
                              entry in LOG file [Log] section. Default
                              is "%H:%M:%S" (unless changed by TimeFormat
                              value in registry)
            

6.1.3. Last access tags

   These tags have the same meaning like the %CurrentX% ones, but
the values are for the connection immediately preceding the current.
The values are read in from the INI file [LastAccess] section, which
is updated after each connection. If all or some of the entries there
are missing, the following values will be returned:   

%LastCnt%             ... 0
%LastGraphCnt%        ... According to %LastCnt%
%LastClientIPAddress% ... <Unknown IP address>
%LastClientHost%      ... <Unknown host>
%LastClientBrowser%   ... <Unknown browser>
%LastAccessDate%      ... <Unknown date>
%LastAccessTime%      ... <Unknown time> 


6.1.4. Other tags

%LogStartDate%        ... Value from the cStartDate entry in LOG file
                          [Log] section. If there is no INI file or this
                          entry/section is missing, the current system 
                          date value is put there, effectively marking
                          the start of logging/access counting
%LastFileUpdateDate%  ... Date when the HTM file was last changed. Direct-
                          ly read from file system
%LastFileUpdateTime%  ... Time when the HTM file was last changed (written
                          to). Directly read from the file system
%HTMLExVer%           ... Link to HTMLEx home page
%HTMLExAuthor%        ... Link to my e-mail address
%%                    ... Will result in a single %. NEVER PUT AN ODD
                          NUMBER OF %'s TOGETHER (That would be odd any-
                          way...)
                       

6.1.5. User-defined random generation tags (in INI file)

   HTMLEx is able to generate any number of random HTM page elements, just
follow this procedure:
> Invent your own descriptive tag name (do not use any of the already
  defined by HTMLEx!), eg. %PageColorScheme%
> Put this tag in the HTM file where something should be changed randomly
  for each client's connection, eg.:
  ...
  <body %PageColorScheme%>
  ...
> Add a section in the corresponding INI file (same name and location as
  the HTM file!), with (up to 26, entries are called "cA" to "cZ"!)
  definitions of random elements, eg.:
  ...
  [%PageColorScheme%]
  ; Black/White/Red/Orange
  cA=bgcolor="#000000" text="#FFFFFF" link="#FF0000" vlink="#FF7F00" 
  ; White/Black/Cyan/Blue
  cB=bgcolor="#FFFFFF" text="#000000" link="#00FFFF" vlink="#0000FF" 


6.1.6. User-defined random generation tags (in Registry)

  These tags apply to all pages being processed by HTMLEx. Each must have
its own key under the ...\W3SVC\HTMLEx key. The following example a puts an
random ad to any number of your servers' pages:

>Using registry editor, create the following subkey in HTMLEx key:
 %BigHeaderAd% (leave the class edit box empty)
>In this key create values with names A ... Z (note: NOT cA ... cZ!) of
 the type REG_SZ (REG_MULTI_SZ, REG_EXPAND_SZ are also valid):
 A  ... REG_SZ ... <img src="/ads/sponsor1/logo.gif">
 B  ... REG_SZ ... <img src="/ads/sponsor2/logo.gif">
 etc...
>In all HTM files where you want ads displayed, you would write:
 ...
 <body>
 <center>%BigHeaderAd%</center>
 ...
 </body>
 </html>

 These tags can be added, removed and values changed on the fly, without
 stopping and restarting the server.


6.1.7. User-defined constant tags (in INI file)

   Each user-defined constant tag is a single entry under the [Tags] 
section in INI file. Entry names must be enclosed in percent signs.
Example:
...
[Tags]
%MailHyperlink%=<a href="mailto:name@machine.domain.com">name</a>
 

6.1.8. User-defined constant tags (in Registry)

   Each user-defined constant tag in registry is a value in "Tags" key
under the ...\W3SVC\HTMLEx key. Using these tags it is possible to update
many HTM pages simultaneously, without restarting the IIS.
Example:

%StandardFooter% ... REG_MULTI_SZ ... <hr>
                                      <h5>[
                                      <a href="...">Home page</a> | 
                                      <a href="...">Guestbook</a> | 
                                      <a href="...">Feedback</a>
                                      ]</h5>
                                      <hr> 


6.1.9. Additional notes about HTMLEx tags

   When using predefined and/or defining new tags for HTMLEx expansion,
please consider the following facts:

- There can be upto 64 different HTMLEx tags in a file (predefined +
  constant, there is no limit for random generation tags)
- Maximum tag name length is 32 characters (including the leading and
  closing %). Tag names are case sensitive (actualy only the predefined
  ones, but keeping case sensitivity is always a good practice!)
- Maximum length of the expanded tag (i.e. it's value) is 2048 bytes. 
  Longer tags are either chopped off or simply ignored
- The length of the expanded file can be 8k longer than the original one.
- User-defined tags from registry (both constant and random) can contain
  references to system environment variables (regardless of their type:
  REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ).
- If having the same name, user-defined tags defined in INI files take 
  precedence over the tags defined in registry. 
- Changing the TagStart/TagEnd via registry and/or INI from % to some-
  thing else, DOES NOT CHANGE THE NAMES OF USER-DEFINED TAGS, IE. THEY
  STILL MUST BE ENCLOSED IN %...% !!!
  
  
6.2. INI Files

   Each HTM file processed by HTMLEx gets its own INI file created in 
the same directory. Why obsolete INIs, and not the registry? The idea
was to let each user freely customize each of his/her HTM files. Users
normally can change the contents of their directories, but they should
be kept hands off the registry! Changing HTM files names and directories
would also litter registry (HKEY_LOCAL_MACHINE) with many new keys and
values. It's better to litter some directory or mess up a few INI files 
than the registry! Values defined in INI overrides those defined in 
registry. Also note that INI entries are always preceded by type character
('i' or 'c'), which is NOT present in the corresponding registry value
name.

=======================================================================
Section             Entry          Default         Note
=======================================================================
[Config]            cTagStart      from Registry   Characters that mark
                                   (TagStart)      the beggining of a tag
                                                   Eg. <!# instead of %
                    cTagEnd        from Registry   Characters that mark
                                   (TagEnd)        the end of a tag 
                                                   Eg. #!> instead of %   
-----------------------------------------------------------------------
[Log]               cStartDate     Current date    In cDateFormat format
                    cDateFormat    from Registry   This format is used
                                   (DateFormat)    for all %XDate% tags.
                                                   See Appendix A for more
                                                   details
                    cTimeFormat    from Registry   Used for all %XTime% tags.
                                   (TimeFormat)    See Appendix A for more
                                                   details
                    cIgnoreAddress from Registry   Comma delimited list of
                                   (IgnoreAddress) numeric IP addresses. No
                                                   counting/logging will 
                                                   occur for these client
                                                   hosts
                    iDigitCnt       from Registry  Valid range: 2-9
                                    (DigitCnt)
                    iMaxLogFileSize from Registry  If the LOG file reaches
                                    (DigitCnt)     this size (in kb) it will
                                                   be deleted, and a new one
                                                   created (if 0, LOG file
                                                   will grow ad infinitum!)
-----------------------------------------------------------------------
[LastAccess]        cTime          See 6.1.3       The %CurrentAccessX% tag 
                    cIP            -"-             values are dumped
                    cHost          -"-             here after each 
                    cBrowser       -"-             transaction, and will
                    iCnt           -"-             become %LastAccessX% at
                    cDate          -"-             the next one
-----------------------------------------------------------------------
[Digits]            c0             from Registry   Any valid image URL
                    ...            (HTMLEx\Digits
                    c9             key)
-----------------------------------------------------------------------
[%WhatEverYouLike%] cA             none            User-defined "random"                                                                                                                       
                    ...                            tags.                               
                    cZ                             Any number of these can
                                                   be present in the INI 
                                                   file, each with up to
                                                   26 entries always named
                                                   cA to cZ. Note the % signs
                                                   in the entry name. (Also
                                                   see 6.1.5) 
-----------------------------------------------------------------------
[Tags]              %Anything%     none            User-defined constant
                                                   tags. Apply only to the
                                                   corresponding HTM file.
                                                   Tag name must be enclosed
                                                   by two percent signs.    
=======================================================================

6.3. LOG Files

   A LOG file with the same name as the HTM is generated in the HTM file
directory (if enabled, see 7.), and will grow up to the size defined by 
MaxLogFileSize value in registry or iMaxLogFileSize value in corresponding
INI file. LOG file generation can be disabled by setting the GenerateLogs
registry value to 0. For the n-th access the following section will be
appended to the LOG file:

[n]
cDate=    ... Current system date
cTime=    ... Current system time
cIP=      ... Value of %REMOTE_ADDR% tag 
cHost=    ... Value of %REMOTE_HOST% tag (or %CurrentClientHost% if 
              present in the HTM file)
cBrowser= ... Value of %HTTP_USER_AGENT% tag


6.4. Application event log

   HTMLEx will generate three kinds of log entries in the Application log:

>Information event, each time the IIS sucessfuly loads and registers
 HTMLEx (each time its starts, under normal circumstances).
>Warning events, e.g. unrecognized tag in file, missing keys in registry,
 failure to resolve IP address into host name.
>Error events, if something inside HTMLEx goes wrong (eg. memory 
 allocation fails, files cannot be read or written to etc.) However,
 HTMLEx should be able to continue with its normal operation.  


7. Controlling HTMLEx behaviour

7.1. Via Registry

   Upon starting, HTMLEx will read its global configuration values which
are stored in the registry, under the following keys:
   
> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters

  This key always exists if the IIS has been installed properly. The only
  value being read from here is "Default Load File" (REG_SZ). This value
  or "Default.htm" if not present (?) is used to distinguish between home
  page or ordinary page access (see below)

> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\HTMLEx

  This key which can be created using the Registry editor (REGEDT32.EXE)
  and contains global HTMLEx configuration values:

  ========================================================================
  Value                Type      Default        Meaning
  ========================================================================
  ExpandableExtensions REG_SZ    .htm,.html,    All files with these exten-
                                 .stm,          sions (note the dot!) will
                                 .shtm,.shtml   be candidates for HTMLEx
  ------------------------------------------------------------------------
  UnexpandableExtensions         .exe,.dll      All URLs containing these
                                                extensions will be skipped
                       REG_SZ                   by HTMLEx 
  ------------------------------------------------------------------------
  SkipDirectories      REG_SZ    none           Upto 16 comma delimited 
                                                full paths can be defined.
                                                URLs located in these di-
                                                rectories will be excluded
                                                from HTMLEx processing.
  ------------------------------------------------------------------------
  DateFormat           REG_SZ    %A, %B %d, %Y. Default format for %XDate%
                                                tags.      
  ------------------------------------------------------------------------       
  TimeFormat           REG_SZ    %H:%M:%S       Default format for %XTime%
                                                tags.
  ------------------------------------------------------------------------
  IgnoreAddress        REG_SZ    0.0.0.0        Comma delimited list of 
                                                numeric IP addresses: No
                                                counting/logging will occur
                                                for these client hosts.
  ------------------------------------------------------------------------
  MaxLogFileSize       REG_DWORD 64             If not otherwise defined in
                                                INI, LOG files will grow 
                                                only upto this size (in kb).
                                                Set to 0 for no limit.
  ------------------------------------------------------------------------
  DigitCnt             REG_DWORD 5              Default number of digits in
                                                graphical counters 
  ------------------------------------------------------------------------
  ExpandByDefault      REG_DWORD 1              If set to 0, each file must
                                                have the <!HTMLEx expand>
                                                tag in order to be processed
                                                If set to 1 (default), each
                                                file must have the <!HTMLEx
                                                noexpand> tag to bypass pro-
                                                cessing
  ------------------------------------------------------------------------ 
  ExpandDefaultPages   REG_DWORD 1              If the current page's name
                                                matches the default page, 
                                                it will be expanded.
  ------------------------------------------------------------------------
  ExpandOtherPages     REG_DWORD 1              Enables expansion of pages
                                                with name other than 
                                                "Default Load File"
  ------------------------------------------------------------------------
  GenerateLogs         REG_DWORD 1              Enables logging for all 
                                                pages that pass through
                                                HTMLEx.
  ------------------------------------------------------------------------
  TagStart             REG_SZ    %              Sets the combination of
                                                characters (max. 16) which
                                                preceede a tag
  ------------------------------------------------------------------------
  TagEnd               REG_SZ    %              Sets the combination of
                                                characters (max. 16) which
                                                must follow a tag
  ========================================================================

  In order to change the default images for displaying  graphical counters, 
  the subkey called "Digits" can be created in the ..\W3SVC\HTMLEx key:

  ========================================================================
  Value                Type      Default        Meaning
  ========================================================================
  0                    REG_SZ    /0.gif         Image for digit "0"
  ...                  ...       ...            ...
  9                    REG_SZ    /9.gif         Image for digit "9"
  ========================================================================

  To change HTMLEx configuration via registry, IIS must be stopped and
  restarted.


7.2. Via <!HTMLEx> tag

  In addition to registry, HTMLEx behaviour can be changed for each file
by inserting the special "meta" tag somewhere near the beggining of HTM
file (harmless, interpreted as "comment" by WWW browsers):

<!HTMLEx [noexpand | expand] [nolog] [justcount] [noctags] [nortags]> 

noexpand  ... all processing skipped. No INI/LOG generation/updating.
              (if ExpandByDefault is set to 1)
expand    ... proceed with HTMLEx processing (if ExpandByDefault is set 
              to 0).  
nolog     ... no LOG file is generated/appended to.
justcount ... performance enhancement. Only the following tags will be
              expanded (in addition to "Random" tags):
              %CurrentCnt%, %CurrentGraphCnt%,
              %LastCnt%, %LastGraphCnt%,
              %%, %REMOTE_HOST%, %CurrentClientHost% (and some others :))
noctags   ... disables the expansion of user-defined constant tags, from
              both the INI file and the registry
nortags   ... disables the expansion of user-defined random tags, from
              both the INI file and the registry

Please note that everything is case censitive in this control tag!


8. File list 

   HTMLEx.TXT ... A very short note about HTMLEx
   Manual.TXT ... Manual you're reading right now
   HttpFilt.h ... ISAPI filters (from SDK, needed for compilation)
   HttpExt.h  ... ISAPI extensions (from SDK, needed for compilation)
   resource.h ... Resource header, required by HTMLEx.rc
   HTMLEx.rc  ... Resource text, contains only a VS_VERSION_INFO resource
   HTMLEx.mak ... Microsoft Visual C++ 2.1 makefile
   HTMLEx.def ... Definition of the two export functions
   HTMLEx.cpp ... Source code
   HTMLEx.dll ... Intel binary
   Test.htm   ... HTM File for testing - contains all HTMLEx tags
   0.gif      ... Small images containing digits 0...9
   ...            These files are used by default for
   9.gif          displaying graphical counters. (Put them into server's
                  home directory.)
 

9. Revision history

   ===================================================================
   Ver   Rev  Date          Note
   ===================================================================
   1     00   14.04.1996.   >First release version. Intel only :(
   1     01   19.04.1996.   >Fatal memory bug squashed (?) - seems it
                             won't bring IIS down any longer ????
                            >Default digit images are /0.gif ... /9.gif
                            >Bug regarding "Random" HTMLEx tag as the
                             first one in HTM file also resolved
                            >.shtm(l) files will also pass through
                             HTMLEx - but who knows what will happen
                             to them... 
   1     02   20.04.1996.   >HTMLEx can be controlled via:
                             - Registry (W3SVC\HTMLEx key)
                             - <!HTMLEx ...> tag in file 
   1     03   23.04.1996.   >It seems that HTMLEx now works fine with files
                             larger than 8k (THIS MUST BE TESTED MORE
                             THOROUGHLY!!)
                            >Following configuration values added to HTMLEx
                             key in Registry:
                             - DateFormat (REG_SZ)
                             - TimeFormat (REG_SZ)
                             - DigitCnt   (REG_DWORD)
   1     04   27.04.1996.   >Resolved bug: percent signs in ordinary
                             HTML tags are ignored (e.g. <HR SIZE=55%>)
                            >Default digits for graphical counters can
                             be set using the ..\HTMLEx\Digits key.
                            >In addition to User-defined random generation
                             tags in INI files, they can also be defined
                             via registry.
                            >User-defined tags can be added via INI file
                             [Tags] section (on a per-page basis), or 
                             globally via \HTMLEx\Tags key in registry. 
   1     05   04.05.1996.   >Log file size can be limited: globaly (in re-
                             sitry) or for each htm file (in INI file)
                            >Counting/INI file updating/logging can be 
                             disabled for hits from hosts with specific IP
                             addresses (e.g. server's own address)
                            >Locations for default digit images changed
                             from \x.gif to /x.gif
   1     06   07.05.1996.   >Tag start and end strings can be changed from
                             % (default) via registry and/or INI file
                            >Reverse DNS lookup bug resolved?
                            >Counter image URLs now include the alt="x"
                             tag (will display something when referenced
                             images cannot be located)
   1     07   13.05.1996.   >HTMLEx default behaviour can be changed by 
                             setting the ExpandByDefault registry value to
                             0 - only files with <!HTMLEx expand> will be
                             processed.   
                            >HTMLEx processing is bypassed for all URLs
                             containing the extensions listed in 
                             UnexpandableExtensions registry key.
                            >No file is processed if located inside one of
                             the directories specified in SkipDirectories
                             registry key.
                
   ===================================================================


10. Notes, comments, warnings, bugs etc.

   HTMLEx is just a modest little DLL, so it is unlikely to have many
bugs. The biggest problem with IIS filters is that any GPF in them
INVARIABLY STOPS THE WWW SERVICE. All client transactions just hang
until they time out, the only method to recover is to stop and restart
the WWW service using the Internet Service Manager. I have tested 
HTMLEx using Microsoft's Internet Explorer V1.5, Netscape Gold 2.01, Lynx
running on Ultrix 4.1, Netscan Tools 2.14, on a Pentium-100 with 48MB
RAM and Service Pack 3, and it worked fine. If you find any bugs,
inconsistencies, or have some ideas about making HTMLEx more useful,
please e-mail me to zoltanp@rijeka.riteh.hr. I am especially
interested in porting the HTMLEx to other NT platforms (Alpha, MIPS, PPC).
If you think you could do it, please contact me by all means - we will
put your port of HTMLEx onto its home page, which is:

   http://161.53.40.11/HTMLEx/default.htm

However, it's probably easier to reach the HTMLEx mirror:

   http://www.ussnet.com/users/htmlex.html

Where you can also easily subscribe to the HTMLEx mailing list.
European net surfers may find the Norwegian mirror site fastest:

   http://www1.heathcomm.no/nyttig/htmlex/


Known bug #1: Sometimes some HTMLEx tags get scrambled - they cannot
              be resolved and are simply being passed through.
              Seems to have dissapeared in V1.04 (?)
Known bug #2: On very long HTML pages, first tag is skipped, the
              second one and the others expand nicely.
              Seems to have dissapeared in V1.04 (?)

********************************************************************
* THIS SOFTWARE IS FREEWARE - IT MAY BE FREELY COPIED, DISTRIBUTED *
*  AND ENHANCED IN FUNCTIONALITY AS LONG AS THE ORIGINAL AUTHOR'S  *
*                         NAME IS PRESERVED                        *
********************************************************************


Appendix A. Date/time values formatting codes (strftime function)

The formatting codes for strftime are listed below:
%a    Abbreviated weekday name
%A    Full weekday name
%b    Abbreviated month name
%B    Full month name
%c    Date and time representation appropriate for locale
%d    Day of month as decimal number (01 - 31)
%H    Hour in 24-hour format (00 - 23)
%I    Hour in 12-hour format (01 - 12)
%j    Day of year as decimal number (001 - 366)
%m    Month as decimal number (01 - 12)
%M    Minute as decimal number (00 - 59)
%p    Current locale's A.M./P.M. indicator for 12-hour clock
%S    Second as decimal number (00 - 59)
%U    Week of year as decimal number, with Sunday as first day of week
      (00 - 51)
%w    Weekday as decimal number (0 - 6; Sunday is 0)
%W    Week of year as decimal number, with Monday as first day of week
      (00 - 51)
%x    Date representation for current locale
%X    Time representation for current locale
%y    Year without century, as decimal number (00 - 99)
%Y    Year with century, as decimal number
%z    Time-zone name or abbreviation; no characters if time zone is 
      unknown (also %Z)
%%    Percent sign


// *EOF*
 